// 导入
import Vue from 'vue'
import Router from 'vue-router'
import Home from '../page/Home'
import News from '../page/News'
import User from '../page/User'
// 注册
Vue.use(Router)
// 配置路由规则数组
let routes = [
    {
        path:'/home',
        component: Home
    },
    {
        path:'/news',
        component: News
    },
    {
        path:'/user',
        component: User
    },
]
// 创建路由对象
let router = new Router({
    routes,
    mode:'hash',
    linkActiveClass:'active'
})

// 导出
export default router